Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make LazyLoadVersion validate InitialVersion the same as LoadVersion (backport #638) #666

Merged
merged 3 commits into from
Feb 1, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 29, 2023

This is an automatic backport of pull request #638 done by Mergify.
Cherry-pick of d8e1e38 has failed:

On branch mergify/bp/release/v0.19.x/pr-638
Your branch is up to date with 'origin/release/v0.19.x'.

You are currently cherry-picking commit d8e1e38.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   CHANGELOG.md
	modified:   mutable_tree.go
	modified:   nodedb.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   mutable_tree_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

…oadVersion`

Co-authored-by: Marko <[email protected]>
Closes #637

(cherry picked from commit d8e1e38)

# Conflicts:
#	mutable_tree_test.go
mutable_tree_test.go Outdated Show resolved Hide resolved
@tac0turtle
Copy link
Member

@yihuang can you help with the tests, then I can merge and release

@yihuang
Copy link
Collaborator

yihuang commented Jan 30, 2023

@yihuang can you help with the tests, then I can merge and release

The issue is due to mistakes in #665, should be fixed with following patch:

diff --git a/iterator.go b/iterator.go
index 1ae5c8c..86495d7 100644
--- a/iterator.go
+++ b/iterator.go
@@ -324,11 +324,10 @@ func (iter *NodeIterator) Next(isSkipped bool) {
                iter.err = err
                return
        }
-       iter.nodesToVisit = append(iter.nodesToVisit, leftNode)
        rightNode, err := iter.ndb.GetNode(node.rightHash)
        if err != nil {
                iter.err = err
                return
        }
-       iter.nodesToVisit = append(iter.nodesToVisit, rightNode)
+       iter.nodesToVisit = append(iter.nodesToVisit, rightNode, leftNode)
 }

@yihuang
Copy link
Collaborator

yihuang commented Feb 1, 2023

the tests are fixed here: #672 @tac0turtle

@tac0turtle tac0turtle merged commit ddbee02 into release/v0.19.x Feb 1, 2023
@tac0turtle tac0turtle deleted the mergify/bp/release/v0.19.x/pr-638 branch February 1, 2023 13:39
ankurdotb pushed a commit to cheqd/iavl that referenced this pull request Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants